Skip to content

Allow Postgres PVC expansion - #34

Merged
Akrog merged 2 commits into
openstack-k8s-operators:mainfrom
umago:pvc-resize
Jul 28, 2026
Merged

Allow Postgres PVC expansion#34
Akrog merged 2 commits into
openstack-k8s-operators:mainfrom
umago:pvc-resize

Conversation

@umago

@umago umago commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Previously, any change to spec.database.size on an existing OpenStackLightspeed instance returned ErrPostgresPVCSizeMismatch, forcing users to delete the PVC (and lose all data) to resize storage.

Now the operator distinguishes three cases:

  • Expand: patches the PVC's storage request to the larger value.
  • Equal: no-op, no error.
  • Shrink: returns ErrPostgresPVCSizeShrink with a clear message showing the current and requested sizes; the PVC is not modified.

Unit tests cover all three cases using a fake client. Kuttl tests was considered by rejected because it requires the cluster's default StorageClass to have allowVolumeExpansionenabled, which can not be assumed in a portable test environment. And since kuttl also has no proper mechanism to skip tests conditionally it would produce unreliable results across different clusters.

umago added 2 commits July 28, 2026 08:56
Bumps grpc from v1.78.0 to v1.82.1 to address vulnerabilities in the
xDS RBAC authorization engine and HTTP/2 transport server implementation.

Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Previously, any change to spec.database.size on an existing
OpenStackLightspeed instance returned ErrPostgresPVCSizeMismatch,
forcing users to delete the PVC (and lose all data) to resize storage.

Now the operator distinguishes three cases:
- Expand: patches the PVC's storage request to the larger value.
- Equal: no-op, no error.
- Shrink: returns ErrPostgresPVCSizeShrink with a clear message
  showing the current and requested sizes; the PVC is not modified.

Unit tests cover all three cases using a fake client. Kuttl tests
was considered by rejected because it requires the cluster's default
StorageClass to have allowVolumeExpansionenabled, which can not be
assumed in a portable test environment. And since kuttl also has no
proper mechanism to skip tests conditionally it would produce unreliable
results across different clusters.

Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
@umago

umago commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator Author

/retest

@umago

umago commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator Author

/retest

unrelated failure in the -bundle test: There are no nodes that your pod can schedule to

@umago

umago commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator Author

/retest

"the build ci-index-openstack-lightspeed-bundle failed after 14s with reason FetchImageContentFailed: Failed to extract image content"

@Akrog Akrog left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci

openshift-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Akrog, umago

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Akrog
Akrog merged commit df489b5 into openstack-k8s-operators:main Jul 28, 2026
8 checks passed
@umago
umago deleted the pvc-resize branch July 28, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants